import { ProForm, ProFormText, ProFormTextArea } from "@ant-design/pro-components"
import { Divider, Modal } from "antd"

interface Iprops {
    isShowCheckRecord: (show: boolean) => void;
    isCheckRecordModalOpen: boolean;
    remark: string | undefined;
    time: string | undefined;
    // actionRef: React.MutableRefObject<ActionType | undefined>;
}
const CheckRecord = (props: Iprops) => {
    const { isCheckRecordModalOpen, isShowCheckRecord, remark, time } = props
    return (
        <Modal
            title="查看记录"
            open={isCheckRecordModalOpen}
            onCancel={() => isShowCheckRecord(false)}
            width={500}
            destroyOnClose={true}
            footer={null}
            centered
        >
            <Divider />
            {remark && time ? <ProForm
                layout="horizontal"
                labelCol={{ span: 5 }}
                wrapperCol={{ span: 20 }}
                submitter={{
                    // 配置按钮文本
                    searchConfig: {
                        resetText: '取消',
                        submitText: '提交',
                    },
                    resetButtonProps: {
                        style: {
                            display: 'none',
                        },
                    },
                    submitButtonProps: {
                        style: {
                            display: 'none',
                        },
                    },
                }}
            >
                <ProFormText
                    name="update_time"
                    label="添加时间"
                    disabled
                    initialValue={time}
                />
                <ProFormTextArea
                    name="remark"
                    label="记录内容"
                    placeholder="请输入记录内容"
                    disabled
                    initialValue={remark}
                />
                <br />
            </ProForm> : <></>}

            <br />
        </Modal>
    )
}
export default CheckRecord;